fix(arq): handle settings_cls passed as keyword argument#5393
Merged
sentrivana merged 2 commits intogetsentry:masterfrom Jan 30, 2026
Merged
fix(arq): handle settings_cls passed as keyword argument#5393sentrivana merged 2 commits intogetsentry:masterfrom
sentrivana merged 2 commits intogetsentry:masterfrom
Conversation
The `_sentry_create_worker` patch assumed `settings_cls` is always
passed as positional arg (`args[0]`), causing IndexError when users
call `create_worker(settings_cls=WorkerSettings)`.
Now checks both `args[0]` and `kwargs.get("settings_cls")`.
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5393 +/- ##
==========================================
- Coverage 84.25% 83.99% -0.27%
==========================================
Files 181 185 +4
Lines 18463 19501 +1038
Branches 3288 3544 +256
==========================================
+ Hits 15556 16379 +823
- Misses 1894 2051 +157
- Partials 1013 1071 +58
|
Contributor
Author
|
thanks was about to apply it :) |
This was referenced Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
_sentry_create_workerpatch assumedsettings_clsis always passed as positional arg (args[0]), causing IndexError when users callcreate_worker(settings_cls=WorkerSettings).Now checks both
args[0]andkwargs.get("settings_cls").Test added in
tests/integrations/arq/test_arq.pyasinit_arq_with_kwarg_settingsDescription
settings_clsis now checked from kwargs if no argsIssues